import static org.junit.Assert.*;

import org.junit.Test;

public class RainGaugeTest {
	
	@Test
	public void rainGoesUpWithoutTipping() {
		RainGauge vic = new RainGauge("Victoria", "Reynolds", 10);
		
		vic.addRain(2);
		assertTrue(vic.getTotalRain() == 2);
		assertTrue(vic.getTipCount() == 0);
		
		vic.addRain(3);
		assertTrue(vic.getTotalRain() == 2 + 3);
		assertTrue(vic.getTipCount() == 0);		
	}
	
	@Test
	public void tipWorks() {
		RainGauge vic = new RainGauge("Victoria", "Reynolds", 10);
		
		vic.addRain(2);

		assertTrue(vic.getTotalRain() == 2);
		assertTrue(vic.getTipCount() == 0);

		vic.addRain(9);
		
		assertTrue(vic.getTotalRain() == 2 + 9);
		assertTrue(vic.getTipCount() == 1);
	}
}
